
import React from 'react';

import { Story, Meta } from '@storybook/react';

import Button from "./button";
import {ButtonProps} from "./button";
import {action} from "@storybook/addon-actions";

// 这是组件的标题
export default {
    title: 'Button 组件',
    component: Button,
} as Meta;

const Template: Story<ButtonProps> = (args) =>  <Button {...args} />

// 这是Primary 类型的组件
export const Primary = Template.bind({});
Primary.args = {
    btnType: 'primary',
    children: 'Primary',
    onClick: action('clicked'),
};

